/** @type {import('tailwindcss').Config} */

// 生成宽度表
const initSpaceMap = () => {
  let map = {};
  let arr = [...new Array(375).keys()];
  arr.forEach((i, idx) => {
    map[`${idx + 1}`] = `${idx + 1}px`;
  });
  return map;
};

// 生成字体大小表
const initFontMap = () => {
  let map = {};
  let arr = [...new Array(30).keys()];
  arr.forEach((i, idx) => {
    map[`${idx + 10}`] = `${idx + 10}px`;
  });
  return map;
};

export default {
  content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
  theme: {
    extend: {
      spacing: initSpaceMap(),
    },
    fontSize: initFontMap(),
  },
  plugins: [],
};
